import Vue from 'vue'
import Vuex from 'vuex'
import cart from './modules/cart'
Vue.use(Vuex)

export default new Vuex.Store({
  getters: {
    xx (state) {
      let sum = 0
      state.cart.list.forEach(v => {
        sum += v.count
      })
      return sum
    }
  },
  modules: {
    cart
  }
})
